<?php
/**
* 这个是个人主页的控制器
*/
class ControllerZhuye extends GetLoad
{
	
	public function index($name_id){
		$this->load("Model/zhuye");
		$this->jialiWEB($name_id[0]);
	}
	public function jialiWEB($name_id){

		$shouye=new ModelZhuye;
		$information=$shouye->Getinformation($name_id);

		foreach ($information as $wenzhang) {
				$data['information'][]= array(
				'information_id'=>$wenzhang['information_id'],
				'title'			=>$wenzhang['title'],
				'neirong'		=>$shouye->Getneirong($wenzhang['neirong']),
				'nian'			=>$wenzhang['nian'],
				'yue'			=>$wenzhang['yue'],
				'ri'			=>$wenzhang['ri'],
				'url'			=>"./index.php?route=Controller/information/ControllerInformation/index&=".$wenzhang['information_id']);
			
		}
		//var_dump($data);
	
		$getname=$shouye->Getname($name_id);
		$data['name']=$getname['name'];
		$data['name_id']=$getname['name_id'];

		$data['xuanyan']=$getname['xuanyan'];
		$data['huanyingyu']=$getname['huanyingyu'];
		$data['touxiang']=$getname['touxiang'];
		//var_dump($data['name_id']);
		$this->view("view/zhuye",$data);



	}
}